<script>
import { handleReturnFromFace } from '@/utils/face'
import autoUpdate from '@/utils/autoUpdate'
import config from '@/config'

export default {
  onLaunch: function () {
    console.log('App Launch')
    autoUpdate()
    this.$store.dispatch('init')
    this.$store.dispatch('initByLocalStore')
    this.$store.dispatch('initMpImages')
    // this.$store.dispatch('initWechatConfig')
  },
  onShow: async function (n) {
    console.log('App Show', n)
    if (
      n.scene === 1038 &&
      n.referrerInfo.appId === config.faceAppId &&
      !this.$store.state.userInfo.certificate
    ) {
      handleReturnFromFace(n)
    }
  },
  onHide: function () {
    console.log('App Hide')
  },
}
</script>

<style>
@import url("components/ly-tree/ly-tree.css");
/* 每个页面公共css */
</style>
